#ifndef TRANSFERCALL_H
#define TRANSFERCALL_H

#include <netinet/ip.h>
#include <netinet/in.h>
#include <fcntl.h>

void set_no_block(int fd)
{
	int flag;
	flag = fcntl(fd,F_GETFL);
	fcntl(fd,F_SETFL,flag|O_NONBLOCK);
}

typedef struct 
{
	int fd;
	char *(*uncrypt_read)(int fd);
	int(*crypt_write)(int fd, void *data, unsigned short sz);
	char *write_buf;
	char *write_pos;
	char *addr;
}file_ops_st;

int crypt_write(int fd, void* data, unsigned short sz);
char *uncrypt_read(int fd);
int transfercall_init(void);
int transfercall_fini(void);
#endif 
